<?php
session_start();
include('header.php');
?>
<div class="container main_container">
	<div class="row">
      	<div class="col-md-12">
			<?php
            require_once("../Controller/Config.php");
                require_once("../Controller/User.php");
                require_once("../Model/UserController.php");
                $object = new UserController();
                $object->addUser();
				$object->AddUserProfile();
                if(isset($_SESSION['test'])){
                echo "true";
                }
                else{
                  
                   header("location:../../index.php");
                }
            ?>
            <form role="form" method="post" action="welcome.php">
			<h2>Please Sign Up <small>It's free and always will be.</small></h2>
			<hr class="colorgraph">
			<div class="row">
				<div class="col-xs-12 col-sm-6 col-md-6">
					<div class="form-group">
                        <input type="text" name="first_name" id="first_name" class="form-control input-lg" placeholder="First Name" tabindex="1" required />
					</div>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-6">
					<div class="form-group">
						<input type="text" name="last_name" id="last_name" class="form-control input-lg" placeholder="Last Name" tabindex="2" required />
					</div>
				</div>
			</div>
            <div class="row">
				<div class="col-xs-12 col-sm-6 col-md-6">
					<div class="form-group">
                        <input type="text" name="middel_name" id="middel_name" class="form-control input-lg" placeholder="Middel Name" tabindex="1" required />
					</div>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-6">
					<div class="form-group">
						<input type="text" name="phone" id="phone" class="form-control input-lg" placeholder="Phone Number" tabindex="2" required />
					</div>
				</div>
			</div>
            
            <div class="row">
				<div class="col-xs-12 col-sm-6 col-md-4">
					<div class="form-group">
                        <input type="text" name="country" id="country" class="form-control input-lg" placeholder="Country" tabindex="1" required />
					</div>
				</div>
				<div class="col-xs-12 col-sm-6 col-md-4">
					<div class="form-group">
						<input type="text" name="state" id="state" class="form-control input-lg" placeholder="State" tabindex="2" required />
					</div>
				</div>
                <div class="col-xs-12 col-sm-6 col-md-4">
					<div class="form-group">
						<input type="text" name="city" id="city" class="form-control input-lg" placeholder="City" tabindex="2" required />
					</div>
				</div>
			</div>
			<div class="form-group">
            	<textarea name="discriptions" class="form-control input-lg" placeholder="Discriptions" rows="5" ></textarea>
			</div>
            
            <div class="row">
            	<div class="form-group">
            		<label class="control-label col-xs-1">Role:</label>
                    <div class="col-xs-2">
                        <label class="radio-inline">
                             <input class="rdio" id="re" name="recogida" type="radio" value="domicilio">
                            One
                        </label>
                    </div>
                    <div class="col-xs-2">
                        <label class="radio-inline">
                            <input class="rdio" type="radio" name="recogida" value="local" checked>Two
                        </label>
                    </div>
        		</div>
         	</div>
          	<div class="row">  
                  <div id="one" class="oculto ">
                     <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="1">Option 1
                    </label>
                    <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="2">Option 2
                    </label>
                    <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="3">Option 3
                    </label>
                  </div>
                  <div id="two" class="oculto">
                     <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="4">Option 4
                    </label>
                    <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="5">Option 5
                    </label>
                    <label class="checkbox-inline">
                      	<input type="checkbox" name="role[]" value="6">Option 6
                    </label>
                  </div>
           </div>
            <div class="row">
            	<div class="form-group">
            		<label class="control-label col-xs-1">IsActive:</label>
                    <div class="col-xs-2">
                        <label class="checkbox-inline">
                      	<input type="checkbox" name="active" value="1">
                    </label>
                    </div>
                    
        		</div>
                
         	</div>
            <div class="row">
            	<div class="form-group">
            		<label class="control-label col-xs-1">Confirm:</label>
                    <div class="col-xs-2">
                        <label class="checkbox-inline">
                      	<input type="checkbox" name="confirm" value="1">
                    </label>
                    </div>
                    
        		</div>
                
         	</div><br/>
			<div class="row">
				<div class="col-xs-12 col-md-6">
                	<input type="submit" name="usersubmit" class="btn btn-success btn-block btn-lg " value="Sign In"  />
              	</div>
                
                
			</div>
            

			<script>
            $(document).ready(function () {
                $('#one').hide();
                $('#two').hide();
                $(".rdio").change(function () { //use change event
                    if (this.value == "domicilio") { //check value if it is domicilio
                        $('#one').stop(true,true).show(500); //than show
                        $('#two').stop(true,true).hide(500); //than hide
                    } else {
                        $('#one').stop(true,true).hide(500); //than hide
                        $('#two').stop(true,true).show(500); //than show
                    }
                });
            });
            </script>
		</form>
            </div>
   	</div>
</div>